package 时间转换入库方式;

import utils.DateUtil;

import java.time.LocalDate;
import java.util.Calendar;
import java.util.Date;

/**
 * @author yangjicong
 * @date 2022/2/15
 */
public class RunDate {

	public static void main(String[] args) {

		LocalDate now = LocalDate.now();

		String monthOfDay = DateUtil.getMonthOfDay(now, 16);
		System.out.println("monthOfDay = " + monthOfDay);
		System.out.println("LocalDate.now().getDayOfMonth() = " + LocalDate.now().getDayOfMonth());

		long l = System.currentTimeMillis();
		System.out.println("l = " + l);

	}


	public static void parse(){
		//将格式字符串转换为 日期类型
		Date date = DateUtil_incentive.parseDate("2099-12-30 23:59:59", DateUtil.DATE_PATTERN1);
		System.out.println("date = " + date);
	}

	public static void timeConvert() {
		Calendar instance = Calendar.getInstance();
		instance.set(2099,Calendar.DECEMBER,30,23,59,29);
		Date time = instance.getTime();
		System.out.println("time = " + time);
	}
}
